<?php foreach ($photos as $photo): ?>
    <div class="photo-list photo-container">
        <a class="photo-list photo" href="<?= url_for('/photo/' . $photo->getId()) ?>"><img src="/uploads/img/<?= $photo->getLink() ?>"/></a>
        <a class="photo-list photo-name" href="<?= url_for('/photo/' . $photo->getId()) ?>"><?= $photo->getName() ?></a>
        <a class="photo-list photo-user-name" href="<?= url_for('/user/' . $photo->getUser()->getId()) ?>">
              Автор: <b><?= $photo->getUser()->getNickname() ?></b>
        </a>
        <div class="photo-list photo-album-name">Альбом: <b><?= $photo->getAlbum()->getName() ?></b></div>
        <div class="photo-list photo-category-name">Рубрика: <b><?= $photo->getCategory()->getName() ?></b></div>
    </div>
<?php endforeach; ?>

<div style="clear: both"></div>

<div>
  <a href="/">1</a>
  <?php for($i=1; $i<$pagesCount; $i++) : ?>
    <a href="/page/<?= $i?>"><?= $i+1 ?></a>
  <?php endfor;?>
</div> 


